buf inside function
added fs in the functon
var
no buffer