check for external files before trying to read