set file_downloaded flag on successful redirect, logging for all responses
fix logic for setting downloaded flag