fixed so that it created image dir if non existant
added x