Is this a sign of a corrupted SD card? It happens just after boot up finishes the code. If so, I might know the reason why. When I tried rebooting my Raspberry Pi twice today, it wouldn't shutdown fully. It would go to the last line of the shutdown stage but never turn off.