Added some error handling and fix url to allow local access.