#5 add base fileevent and hooks