adding metadata and log