Fixed bug with custom pids directory