fix having both basename and filename