File I/O working correctly now