Handle existing pid file properly