Added logic to ldb_write to accomodate less than 4K writes which occur during Windows instal