Add few debug statements and limit thread usage.