Working on issue #34, but fixed deleting temp files in the meantime