utility to move files upon close()