There appears to be a problem with obtaining the actual filename of a "referenced"/ externally stored container. If you have two or more records with your file settings for referenced containers you can see the problem.
In the first record place a file named something like "Test.jpg" into the container. It can really be named anything. The normal method of getting the filename such as GetAsText(containername) and GetContainerAttribute(container,"content") reports the name as "Test.jpg". Now place a different file named "Test.jpg" into the next record. The file name is still reported as "Test.jpg" when actually the file has been renamed (by the computer file system) to "Test_1.jpg" since the first name is taken. Keep doing this and subsequent files will be renamed "Test_2.jpg, Test_3.jpg," etc. Both noted approaches report the actual name incorrectly.
The only way I have found to get the actual name is by using GetContainerAttribute(containername;"image") and then parse the name from that information.
Since no mention is given to this problem in the documentation or examples I would consider this a bug.