fixes to the reducer to store the file