refactor helper && add alert for wrong file type