Improve flash command