Save file after scanning