Fixed major bug in plot-file