log refactoring in keep-alive test scripts