added logs and metrics