Creating a preprocess function for loading the full object of the file.