script to convert jpg files to width 500 is done