Check filename

Check filename to handle files left empty in the submitted form.