Fixed an infinite loop with a wrong result file format. Related to ticket:2159