Changed how arguments are handled and added text input file option
Fixed minor typo