fix crash if file not exist and memmory leak after read chunk stream