[Fix] Cursor not closed in getFile.

@wizcorp-olivier よろしく。