Fixed file creation bug in file writer and removed cache dump from constructor