Refactored task configuration handling so that error messages can be dynamic, based on the config value