Adds error checking to data download