Adding logging and integration tests