log request data if debug is enabled
log request data if debug is enabled (fixed env variable name)
added handling for acknowledgment messages