Added a safe logger based on query string parameter