More robust creation of error logs.
More intelligent creation of error logs.