Refactor file.c to use new string types