Splitted out return status to a new function.