Some file operation fixes and comments

@chchwy , I will be a bit busy for a while, I don't know for how long. 

Hope all is going ok out there!  

Cheers!