Created an error logger to manage writing errors to a file