better error msg when port direction needed