If there's an error or something like: System.out.print("sourcelist[" + i + "] = " + sourcelist[i] + "\n"); System.out.println("Error reading source file " + sourcelist[i] instead call fail, with the same parameter.