Fix error logs to output to STDERR