log down the error messages