How to keep Custom Attributes when restarting a file?