Adds some file io code

Deosn't work