Added improved error reporting for invalid theme configuration

Fixes #47