Ensure directory is available before creating file
Provide better error message
Temp file will be removed upon close