Problem with script was the final blank line in input.