bug-fixes and some output files