Adds more logs and error logging.