input validation for $config and $disk