fixed the initial setup of the image path on script run from command line