Adding tests for tmp file fallback