Basic Javascript Error Logger