Check if files exist and contain data, fixes #693