stop program if file exists but is corrupt