Showing a better error message

Previously we just showed a message saying that config was not defined. This
shows a better error message that can help developers fix the problem. Also,
the error message can be overriden.