Added exit code on error