add support for pkg file require, Fix #6