* [INS-37] Fixed the issue of ftp connection ignoring the detector's context timeout * fix: ensure FTP connection is properly closed by adding c.Quit() * Add error handling for FTP connection cleanup (c.Quit) * Refactor code as a 3-part if else statement --------- Co-authored-by: Kashif Khan <[email protected]>