Closed the output stream of the log proxy.
Added an enable/disable variable for the logging option.