Added error message and exception in case of part key not set