mixed input, bson and mongodb plus cleaned up logging and args