refactor and delete not used file_dir