adding a file for outputting preview jpgs