Changing logging and improving it further :)