Resolving the button issue --untested
Attempted to fix the write file format (time

and date when the app starts and stops), as well as the problem of the
file not being visible on the computer until device reboot.