Ignore output dir
File writing and external config

Added filewrite functionality, added external config also to control
different settings.