Added is_filetype checks