refactor for import error if files missing