import and adopt libqb. add watchfile