I have updated the arduino version 1.6.9 to 1.8.5. Now it is working fine. Thank you everyone for your support.