fix resource requires

* use path relative to the file