Check platform AFTER setting value not BEFORE

Fix typo introduced when changing from CLRF to LF