Added a logger to the PipelineStage
Added make_es_doc function. Should be renamed soon