nalwrite: simplify write method; single allocation with no reallocs