If the pi isn't logged onto a network or the MQTT server isn't available the script won't load properly.