Added a few lines in _get_mapper method to check that we can actually read the provided file