More fixes in arguments parsing of learn and debug