def out fname option implemented.
output filename option ok