structure for documents in mongodb created
made the dirname configurable
made the dirname configurable