Changed error messages to be more verbose about their context.