Changed a cerr debug call in main that prints that an error occured in the pipe