move the 'freeze' command in a file on its own and implement issue 1515