fixed fileEx AttributeError issue