fixed log reading problem