#80 fix crash when saving a empty file