add readFile method
add simulateMemoryWarning