Fix for backwards compatibility
Check for actual file, not just directory