Use the correct variable when constructing an error message.
Insure that error messages always end with newline.