Changed config template to use number type and guard against illegal input