refactor(core) Use async fs calls instead of sync calls