Added support for other commands and updating log