#508: change isOutput detection