Fixed file clearing