Changed error color to red and fixed an issue with error reporting.