Improved InterruptedException handling