added PathUtil to work around the java bug