added logging to main operations