check for Code dir first