Adds error handling in the gulp images task