Enerdy thread bug fix & logging exceptions.