server-ui: improve error handling in file preview mode by displaying the error message if loading the file fails