Added error handler for InterruptedException