Automatically rename layer to filename

I have an idea for a setting in options:

If a model only has one layer (and the name of the layer is some default value like “Layer 01”), it could be handy to automatically rename it to the filename ?

For me, I get a lot of different files sent to me and I build up my own model out of those, by importing into one master file, this option could automatically organise my master file. Instead of having everything in Layer 01

This could be achieved with a script.