Better error handling for loggly output