Change render of error msg
Add a condition to check input container is empty or not
Fix bug
Change variable name
Add debug message
Change all event creators from lambda function to normal member function