Improved code for moving migrated files in the store directory