better opening of CBEnergyCorrectionPerRun file, also error message and exit included