gardalte: Fix writing to sys for torch