Fix error handling for process command