/// <summary>
        /// construct new <see cref="PhotoShopResponse"/> from given parameters.
        /// </summary>
        /// <param name="commStatus">
        /// communication status returned from PhotoShop
        /// </param>
        /// <param name="replyBytes">
        /// byte array returned from PhotoShop
        /// </param>
        /// <returns>
        /// new <see cref="PhotoShopResponse"/> from given parameters.
        /// </returns>
        /// <exception cref="ArgumentNullException">
        /// thrown when <paramref name="replyBytes"/> is null
        /// </exception>
        private PhotoShopResponse constructPhotoShopResponse(
            int commStatus,
            byte[] replyBytes)
        {
            if (null == replyBytes)
                throw
                    new ArgumentNullException("replyBytes");

            try
            {
                switch (commStatus)
                {
                    // when PS reports no-error,
                    case PhotoShopConstants.NO_COMM_ERROR:
                        writeAsRunLog(
                            "Read this encrypted message : " +
                                replyBytes.Length,
                            replyBytes);

                        var recvDataBlock =
                            DataBlock.CreateNonErrorDataBlock(
                                _encryptDecrypt,
                                replyBytes);
                        writeAsRunLog(
                            "Decrypted Message : ",
                            recvDataBlock);

                        var resultOK =
                            new PhotoShopResponse()
                            {
                                Status = CommunicationStatus.OK,
                                ResponseBlock = recvDataBlock,
                            };
                        writeAsRunLog(
                            "PS Response" + Environment.NewLine +
                                resultOK.ToString());

                        return resultOK;
                    // when PS reports error of its own
                    default:
                        writeAsRunLog(
                            "Read this error message : " +
                                replyBytes.Length,
                            replyBytes);

                        var errorBlock =
                            DataBlock.CreateErrorDataBlock(replyBytes);
                        var resultError =
                            new PhotoShopResponse()
                            {
                                Status = CommunicationStatus.ERROR_PS_REPORT,
                                ResponseBlock = errorBlock
                            };
                        writeAsRunLog(
                            "PS Response" + Environment.NewLine +
                                resultError.ToString());

                        return resultError;
                }
            }
            catch
            {
                return
                    new PhotoShopResponse()
                    {
                        Status = CommunicationStatus.ERROR_COMMUNICATION
                    };
            }
        }