writeAll moved to lmd_writer.js