Added input for file and keyboard --- Missing input validation