move logging into backend