Maybe start with the Espruino logging example and work your way onwards from there?
I also think this is the best idea
now i try to store data in flash memory and build a simple app to read that file
I think instead there is no way to insert the timestamp without having a connection to the phone?