Filename resetting handler corrected