I suppose the file can be cached and its update can be delayed a bit and then lost with sudden reboot.
So I can provide a common suggestion. Please try to perform "sync" before reboot.
By the way. What filesystem is used for /data ?
Is it located on some separate partition or device?
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------