Must convert from async file operations to sync inside web worker