added ajax, check file and download file