Added extra check to file panel dialog