Fixed possible crash caused by unhandled exceptions from canonicalizePath