trySetAppRoot helper