-Removed duplicate filetype check