Layer names
I spent some time today creating actions to automate masks for shadows and highlights, but when I looked at the steps in the actions they involved accessng the layers by the layer names, and Photoshop seems to automatically name the layers based on the file name. So the actions that I created with one file and its layer names failed on the next file because the script could not find the specified layer name to click on. That made me wonder if there was some setting that specified how the system should specify label names, but when I looked at the Settings options I could not find anything like that.
I can get around this problem by renaming every original layer "Layer 0" or something like that and re-recording the scripts, but I was wondering if there was some option that I missed when looking over the settings. Alternately, what do others do when creating actions that refer to label names? Or how do they avoid using label names?

