rename teraDirectory to directory
js check tera, when not exists initialise tera!