fix errno typo to error, and fix import Condition