closes #4 added option `ext` to define the file extension