Added error to clear command
Unit test added
Unit test added