additional logging, multithreading protection, cleanup
Merge pull request #204 from apigee/USERGRID-1768

additional logging, multithreading protection, cleanup