Modify flushing strategy
Flush after every write instead of when the entire torrent is downloaded to
eliminate the possibility of losing received data on premature termination of
the program.