Added save data check and doc blocks