logging and tests