use path.resolve instead of fs.realpath