use readlink instead of realpath