[fix] rl_end readline crash; [security]; [dbg]endl

reading trash from rl_buffer (possible buffer-overflow read? probably not but not checked)

btw endl (flush) for logs (so they work with text)