test for existence of file before open. use spaces instead of tabs