Changed the way we check for a output file.