finish logging