add test for commandline overwrite, fixed upgrade and refactored start and stop function