Logger methods format string with arguments

No need to call String.format any more before logging. Also inlined
FileUtils.writeToFile to avoid circular dependency with MyLogger.