Attempting to read and write to file