Made cache bigger, fixed potential bugs when files go bad.