improve parse_filename

Signed-off-by: Jack <jack.wgm@gmail.com>