def open_file(filePath,mode="a"):
	"""
	Open a file at @filePath with mode @mode and
	return the file descriptor. 
	"""
	try:
		f = open(filePath, mode)
		return f
	except IOError:
		print ("Error: could not open",filePath)
		return None