fix #18 (corrupt datafile), better error message, logpath