fixed bug where preview was cleared after overwriting the selected file.

Change-Id: I940e69a64844b0be50eb929639c7de0a3ead60f2