Fix if filename is empty