Fixed some typos. `writeOutputToFile` does not raise and exception anymore.