Corrected indexes computation
Set to save temporary files in Temp folder