fixed bug in stabilize. changed fileHandler (added switch)