Restart device and update existing python file in RPi

Yes, It is from the script module, Few times it worked fine, But twice it failed and yes, It went to “Inconsistent” mode, But after that, the device stopped taking real time update.