updating image script to support cli options