modified from sync api call to async api call
modified source structure and refactor. added api (set plugin dir path)