try changing 'write' to 'echo' instead, perhaps it is a bug with 'write', he is using a different compiler now and may have overlooked changing his file access functions..