Removing incorrectly written files