remove bug when creating pid file