printing error code (if an error occurs) fixed warnings