Refactor the file builder