update log and metadata