Fixed reset connection variable before no file error