Handle errors in file loader, and remove renderer special case for headless mode