Check for filename instead of dir