Why not use this file name variable for error checking
?
Set it to ""
If it gets a name in it then theres an error.
Save a little bit space