path auto detect