Add guard for downloading file.