trying to fix temporary file issues