add sanity check to download of public file similar to existing check on private file #664