Random error generating: passing the file path to random_error.