Check if pid file exists before unlinking