Put the checks for i/o dumps into a separate function. Call that function after the 0th step as well.