Better error handling for loggly output

Keep loggly from crashing the agent when it can't connect