added icon. improved error handling