Updated to work with symbolic links