import json
from scripts.config.config_reader import application_config


def file_write(content):
    fileObj = open(application_config['motor']['status_file'], 'w')
    fileObj.write(json.dumps(content))


def file_read():
    fileObj = open(application_config['motor']['status_file'], 'r')
    content = json.loads(fileObj.read())
    return content
