Is deleteDirectory really needed? Isn't deleteFile enough?