Small bug in generation of on_exit.sh template