add file cache, thanks to gouki