Added verification for error conditions