check both db and storage if file exists