Create missing data files on start up

Signed-off-by: themuntdregger <themuntdregger@gmail.com>
append new line char to log entries
correct bug in function save_map arising from id being hard-coded as 0

Signed-off-by: themuntdregger <themuntdregger@gmail.com>