Implemented support for logging to file