Startup Issue

Yes, the rule is triggered before the system is initialized completely. You should add some timer to delay your rule.

You may have a look here, if you don’t need the complete stuff, this is at least an example to delay startup.

https://community.openhab.org/t/cleaning-up-the-startup-process-renaming-rules-windows-possible/38438