Added some error handling when loading page and file links.