Prevent crash when passing base filename.