Wrote a file deleting method.