fixed stderr logging