added locking to mediafileitem