filename is relative if rootDir in filename; else already relative