renamed log.txt to lastError.txt