improve file's ext check