File tempFile = new File(file.getAbsolutePath() + ".changed");
try {
// Try to save the changed program
OnDemandDayProgramFile newProgFile = new OnDemandDayProgramFile(
tempFile, checkProg);
newProgFile.saveDayProgram();
// Saving the changed version succeed -> Delete the original
file.delete();
// Use the changed version now