Update main.c

Adding in I/O funcitonality