Why don't you write if (foundDisks) { here ? It would probably be more readable / make more sense