log module fix for exit