Modification to get the file type working properly.