move pubPath to onActivate