Added loglevel variable