fixed validation of fileType