added logging, fixed headers for 2 files