import json


def readfile(filename):
  """ Read JSON from file and return dict """
  try:
    with open(filename, 'r') as f:
      return json.load(f)
  except IOError:
    print('Error while reading from file')