Test utils.saveAll and fix the asynchronous save problem