Include base_path in path when opening file for write