Converted organize_img to bash