readd zmachine shutdown handler