Added exception handling from invalid source.