Moved fetching the file previews into a separate method