test + logging improvements