fix debug texts

add date
print debug texts into stderr