making it possible to log to a file (not just STDOUT)