Nearly full state machine definition
Adding extension to files
Ignore image files
Working state machine