Added check for python version 2.7+