Added clearInterval call to stop the interval callback when a valid title is found in a successfully loaded webpage. This way it doesnt try to reload the page while writing the contents out to file