change -> incorrectly worked if (err) in function