add PID lock for running plugins