exit on image load error
add command line arguments, first cut
remove debug code