Externalize the file methods