fixed bug on missing pid file