<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, env_file):
 """ Write the Alignak configuration to a file :param env_file: file name to dump the configuration :type env_file: str :return: True/False """

        try:
            with open(env_file, "w") as out_file:
                self.config.write(out_file)
        except Exception as exp:  # pylint: disable=broad-except
            print("Dumping environment file raised an error: %s. " % exp)