Add information to debug log, improve client for tests