added --log [logfile] parameter.

by default logging is not turned on