server2: add post download loop error handling
server2: when file is downloaded successfully, move it to
its final path.