fix gfile bug. Thanks Nick