Corrected the error reporting