freeing filename added
smaller buffer that is continuously written to file