[R][Main] Improved Dev Dectection