Added logging. Changed logging levels.