Added storing last position and file name