added test for file existence before import