fixing bug where empty files would call the callback twice. removing debug logs