Tweaked for file cleanup