Cleaner version of code to enable prepare-agent to run in pom packaged project