reorder imports
add more keys
switch to logging
remove temp dir