implement real time preview of files #558