properly close file senders on exit