initialize dir reader and exception