Added interrupt API and extended stdio