Check for exit code is equal to 0 instead of 127