Made debugging level configurable