fixed cleanup with signal handling

now modified configurations are saved on file when the program is closed with a ctrl-c, so there is no need to save the window size update on every modification.