Fix bug on first-render when a file is present