diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py
index <HASH>..<HASH> 100644
--- a/napalm/ios/ios.py
+++ b/napalm/ios/ios.py
@@ -442,6 +442,7 @@ class IOSDriver(NetworkDriver):
             output = self._commit_hostname_handler(cmd)
             if ('original configuration has been successfully restored' in output) or \
                ('error' in output.lower()) or \
+               ('not a valid config file' in output.lower()) or \
                ('failed' in output.lower()):
                 msg = "Candidate config could not be applied\n{}".format(output)
                 raise ReplaceConfigException(msg)
FIXES #<I> additional error message on failed replace (#<I>)