Do syncing as a lastaction so that we don't rotate unzipped log files.
Merge pull request #1491 from edx/feanil/fix_log_syncing

Do syncing as a lastaction so that we don't rotate unzipped log files.