asprintf warning solved
fixed hang at eof
need to fix bugs at one point