Added empty-file cleanup function.