check existing file in output routines (write*.m)