Remove calls to deprecated FS API