move mongo cnx initialization to tasks framework, to allow testing of base modules
fix MD validation logging
add configurable init_db function