Changed error message prefix string to a constant and wrapped to a function.