added flash file handling