Slightly better handling of badly formattes files