The problem is that save-to-disk works like the device drivers, and is a global preference (it is stored in your config data, not in the library database).
As theducks said, current_library_name() is your friend -- but if you are unsure how to use it, feel free to ask and we can write a suitable template for you.

Just tell us what you want to see.
Note: There is a dedicated help sticky in this subforum with various tips and things that people have asked for in the past.