fixes a particularly nasty bug where we were rewriting all binary data, not just text
cleanup files api
hacky first pass for linking block to namespace before transaction log post-flush hook