finished cleaning up dir/file creation code