delete all read_file functions

All leaked a resource. Closes #139.