passing through loggederror formatting, fixed bugs