Add additional state handling for flash handling and compression