Fixed console and file logging.