added logging to mainactivity