Add code to deal with symlinks