cleanup tmp folders
add option for server-side encryption