added logging to main script