Update writer.py to check json directory for configuration files