Add new logging mechanism for writing errors to log file.
Change all System.err() to Logger.printErr()