save raw and metadata in mongodb
check if data changed. closes #24