fix pipe error and add mongodb