add logging in place_if_modified