properly catching InterruptedException