Adding error logging for locationerror