fixed globally leaking fs assignment