The check engine could be a lose gas cap. If you check the code with an OBD2 reader, it will probably be in the range of P0440 - P0457 indicating Evap system leaks
As for the pump shutting of before being completely full,... there is a breather hole on the gas nozzle tip that permits air to enter during the filling. If the little hole gets blocked, the flow of fuel stops. Normally, as the tank fills, fuel backing up the fuel tank fill pipe reaches the hole and flow stops to help prevent spilling gas, but the breather hole can be blocked by other things too. Sometimes there is fuel splash back that momentarily blocks the hole and caused the nozzle to stop delivering fuel. Sometimes it’s just positioning of the nozzle in the fuel filler neck.