Put the code that moves the master-password file into a block to ensure it runs in the run phase.