use dirname and relative path