Removing use of deprecated sprintf