Adjusting how errors are logged

This should allow for working out any JS failures that may occur