added control in case of "" filename