Add chan for main func wait