Code refactor: Error first callback