exit codes for sucess/error appear to be mixed up