made failure recording synchronus, jslint fixes