conflict with -headless and -file . if else error