The canine challenge

Using a programming language of your choice, implement a software
version of a man's best friend as described in the man page
below.

Man Page

NAME
        dog - read from standard input and write to file(s)

SYNOPSIS
        dog FILE...

DESCRIPTION
        Unlike its feline counterpart, dog reads from
        standard input and writes to FILE(s).

EXAMPLES
        $ echo foo | dog file1 file2
        $ cat file1
        foo
        $ cat file2
        foo

NOTES
        Using its canine wisdom, dog performs its task as efficiently
        as possible. In particular, it happily works around the
        following peculiarities of its owner, The User.

        1. The User often sends dog input larger than total available
           RAM.
           
        2. The User plays tricks with dog to see if it takes advantage
           of all available I/O parallelism. For example:

           - She often specifies FILEs that are located on separate
             physical disks
           - She often stalls between sending large chunks of input