@panos29 Both boot.py and main.py are executed at power on and reset, and give you the starting point. So you can put your code into main.py, or in a different file, which you import from main.py (which is what I prefer), or, or, or....
If you want to customise how the current process works have a look at the https://github.com/pycom/pycom-micropython-sigfox/tree/master/esp32/ftp folder, especially updater.c.