implement new xml format and bug fixes --> now working

Really small but important bug fixes in particular when checking is a process is already running or not