Moved printing usages in a function
Added and fixed an error message for checking integer value of user input