Error 54
Possible causes:
A Put or Get statement specifies a sequential file. Put or Get can only refer to files opened as Random .
A Print # statement specifies a file mode other than Output or Append.
An Input # statement specifies a file mode other than Input.