checkFileExists method
Implementation
void checkFileExists(String path, String entityName, {bool force = false}) {
if (File(path).existsSync() && !force) {
throw Exception(
'$entityName already exists at $path. Use --force to overwrite.',
);
}
}