Corrected Error messages and Error codes