fix buffer flush issue, in a very hacky way; need to clean up the client code significatly
speed up imports by allowing objects to be passed to esclient.write instead of JSON serializing/deserializing them through the pipe