simpler readline; fix read empty line