fixes your filecache

see subject.
also you want to put real error handling in there.