Added option to specify record file.