fix file output
add text generation