There was an error in the last call to Process that you did not check for and handle. You should always check the output of the Process call. If it was undef then there was a fatal error that you need to check. There is an error in your program