Adds logging function
Merge branch 'sendingdata' into GUI