Improve file utils
Improve chunking