Added command on async basis
Started refactoring read_fold.js to work on async basis