Added log messages + minor improvements