Improved console error logging