Refactor file drop