added support to start in minimized mode (using -m or --minimized)
(also added return code - 1 and 0)