[BUGFIX] Only persist processedFile if processing was successful