updated background pid saving