Added logging feature and some setups