Fixed EPF generation when printer driver is slow and locks file while printing.
Separated plotting tests into functions.