Remove unnecessary writes to disk