Bisect: refactor some logging into "bisect_write".