Adding locking to iterator.  Fixing some issues related to QFileDialog.  Implemented atEnd function for file reading