Frame max size set to be 16383 bytes, added IO exception handling in the SaveData method for safe saving