Added sanity checking when downloading from network.