export WriteStream, switch args, minor formatting