added support for handing over filename as command line arg