Moved init out of a loop and added synchronization
Changed exception naming
Merging in loggly changes to local loop removal