Now the files will be opened after download. Fixed some bugs