added exit codes if there are problems