moves file to the right place