add a tmp to eps_pathname and a double check if file exists before creating it