Improve save canvas callback