Adding code to handle non-image files in file picker.