Unreinventing the wheel and using standard I/O functions