Added error handling functions for all the commands. Yet to add unit tests and stress test