added checking if file is actually selected (importing)