Fix #148: fix empty pid file