Don't close layer files when getting files json

Operations taking a file object should not close that file object.