   packet.poi_timestamp = timestamp
   packet.poi_comment = comment
 
+savePacket = (packet) ->
+  setTimeout (->
+    return unless packet? and packet.poi_timestamp?
+    filename = packet.poi_timestamp
+    file = path.join(APPDATA, "#{filename}.json")
+    data = JSON.stringify(packet)
+    fs.writeFile file, data, (error) ->
+      return unless error
+      console.error error
+  ), 0
+
 
 MainArea = React.createClass
   componentDidMount: ->

      battlePacketsNonce = updateNonce battlePacketsNonce
      while battlePackets.length > MAX_PACKET_NUMBER
        battlePackets.pop()
      # Render battle packet
      if @shouldAutoShow
        battleNonce = updateNonce battleNonce

fs = require('fs');
path = require('path-extra');

{React, ReactDOM, ReactBootstrap} = window
ModalArea = require './modal-area'
OptionArea = require './option-area'
