also logging error to stderr
now operating directly on input and output data using numpy.memmap. performance gain: 5x