Fixed generation of pid file for instance.id