changed formattedName to label, removed break
started action
made logging conditional
added conditional error logging