Generating IWD will cause an exception if there is no original 'sound' folder. Checking if the directory exists before attempting to call GetFiles would resolve this.