prints warning for labels found
added exception handling