added logic for when the output has only one timestep per file