Modified script to run in parallel and to create thumbs and png files at the same time