Add more read and write functions for the file object