make it work with external projects and relative paths as well