Move 'import sys' to the end