Fixed bug where incorrect file name was used.