rename copy_insert to copy_log_sq and writing tweaks