added error checking to custom_css