stream and state from in file