debug output, better host construction, testPermission() seems to fail