finish logging etc