Check return value from fread()
Merge remote-tracking branch 'origin/master' into vapour