added test 504. changed to only save diffs on fail