Saved filename instead of path to eliminate a data race bug