fix missing sys import
exit if no timeframe was determined