Fixed not writing errors to console