PidFile class instead of pid_file function