updated to handle symlinks differently