a bit more restructuring, implemented file naming, added error catching
to width specification.