read-line should be called once