Fix error reporting

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>