limit allowed commands and report invalid command