Last two CInt fixes for 64 bit, and bracket writeFile while we're here