Successfully taking input from file