checkImageExists function
Implementation
String checkImageExists(
{required Map<String, dynamic> config, required String parameter}) {
String image = config[parameter] ?? '';
if (image.isNotEmpty && !File(image).existsSync()) {
print('The file "$image" set as the parameter "$parameter" was not found.');
exit(1);
}
return image;
}