Added temporary file functionality