Added support for checking invalid file names