Also handle the exit after load and output file cases for ref tests