Add missing import (logging). Whitespace fixes.