Add a check for output files