Apparently the read command can exit with a non-zero status when reading from a here-document