Move document root check