Moved calculation to function to get rid of repeated code
Removing the file with the PID
Adding RUNNING_PID to the ignore file
Updating XML files used for tests