logging added in amend_package