Extended logging and added docs