Allow config.errorTemplate. Closes #2