replaced truePath function with relative path