File I/O is now working

File i/o works, done kinda strangely but it works with all other
functions needed.