Added locking for file readers.