added append_file test and fixing kqr's issuses