You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: build.rs
    path of file: ./repos/amethyst
    
    the code of the file until where you have to start completion: use std::{
    fs::{create_dir_all, read_to_string, remove_file},
    path::Path,
};

use dirs_next::config_dir;
use vergen::{self, ConstantsFlags};

fn main() {
    let amethyst_home = config_dir().map(|p| p.as_path().join("amethyst"));

    if let Some(amethyst_home) = amethyst_home {
        if amethyst_home.exists() {
            if let Some(true) = check_sentry_allowed(&amethyst_home) {
                load_sentry_dsn();
            };
        } else {
     
    
fn check_sentry_allowed(amethyst_home: &Path) -> Option<bool> {
    let sentry_status_file = amethyst_home.join("sentry_status.txt");
    if sentry_status_file.exists() {
        match read_to_string(&sentry_status_file) {
            Ok(result) => {
                match result.as_str().trim() {
                    "true" => Some(true),
                    "false" => Some(false),
                    _ => {
                        remove_file(sentry_status_file)
                            .expect("Failed to remove invalid sentry file.");
                        None
                    }
                }
            }
            Err(_) => None,
        }
    } else {
        None
    }
}