check if phase before apply in file select

This fixes issue #62 in IE 10 and less (only tested 7-9 with browser mode though)