Fixed imageapp to work with command line