close file transfers on exit & fixes