Fix for #41 + file save logic reliability enhancements