Fixed optional filename parameter and updated documentation

The documentation indicates that a different filename could be provided despite what the logical file name is.

But this was not working as always the logical filename was used.