change filename and use open to handle error
energy calibration