Modified processInvalid

This will process the invalid command types and display appropriate
usage message for user.