Using the "name" of a template, resources, etc will most likely end bad. Names are changing all the time. I'd recommend using the id and adding a file to the directory as a visual fallback.
assets/templates/200/standard.txt
If you want to, you can add an image to this directory displaying the name or id:
Here is an example for docid...
if(!file_exists($fullpath . $docid . '.gif')){
$placeholder = file_get_contents("http://placehold.it/150x150&text=$docid");
$image = $fullpath . $docid . '.gif';
if(!@file_put_contents($image, $placeholder)){
$msg[] = $image . 'could not be created';
}
else {
$msg[] = $image . 'created';
}
$msg[] = $docid.'gif created at' . $fullpath;
}
$modx->log(MODX_LOG_LEVEL_ERROR, print_r($msg,true));
The result looks like this:
Cheers,
pepebe