Fixed the reset() function to also clean the output buffer and the log file queues.