Logging

Added ability to log messages to a file