Dog almost bites man