modified OpenCommand to open only jpg/jpeg files