少なくとも
fileID2 にも -translation binary が必要で、puts に -nonewline オプションが必要だともう。