Added access check to file downloads.