Move namespace to be final positional arg

Otherwise, we can't pass namespace as a kwarg; the partial function
will complain about duplicate arguments being passed.
Fix some race-conditions with line overwriting

I think this occurs when some data was still being asynchronously written.