Fix fail to lookup file type