Correctly check and resend the filename