Display error when schema is invalid

Resolves #46