Added check to see if link element exists before trying to swap css files to prevent errors with updating css files not included in html