set search root path & writable path

Please use std::string for parameter type as other functions do.