now generate .done only after log is written