fix bug in checkInput function, add gitignore