working flashing from a file