Added file saving functions and interest object detection