Fixed temp directory writing