Throw error on bad file + to_validate and get_plugin fixes