Use File.basename to get last path component