Return different error codes in escript when checks pass or fail