first step of BLR_fit, reading/writing data