Added error indications

denoted by "//ERROR HERE"