If the connection is not valid don't bother trying to save history