Added optional error popup