fixing log/error