tsan: add check for invalid fd