Added option for doc command to output to a file.