minor non functional changes and debug cmd