File moving handled by function