improved error handling and other stuff
improved version handling