chmod(0755, './STATES'); open(SAVEDSTATE,">$STATE_DIR/$session_key"); save_parameters(SAVEDSTATE); close SAVEDSTATE; chmod(0000, './STATES');