altos: Only try to erase log if HAS_LOG is set