updated logic in get_links
removed link file