Read input from a file