Replace filename argument with options argument
Add type option
docs: add example section