make parsing more robust for input filenames
make parsing more robust for input filenames