Looking for methods to Check if File Exist

There’s a lot of ways you could go with this. I might enqueue the style in your theme’s functions.php dependent on a file_exists() check.

$your_css_file_path = "/path/to/file";
if ( file_exists($your_css_file_path) ) {
    wp_register_style('your_theme_stylesheet', $your_css_file_path);
    wp_enqueue_style( 'your_theme_stylesheet');
}

Here’s the relavent core source.

error code: 523