fixbug: does not include SQLAlchemy if dbsession is not configured.
clear waste print code