added commandline parsing and reduced debug output