read commands from a file