Updated with check to bypass check if local mode