Catch exceptions from Profiler.sendStats

Closes #166