fix bug when unlink pid file