catch errors writing cached file to fs