#! /usr/bin/env python3

import sys

def main(fileName):
  try:
    with open(fileName, "a+") as f:
      msg = "ok\n"
      f.write(msg)
  except PermissionError:
    print('Access to file not allowed')
    raise

if __name__ == '__main__':
  main(sys.argv[1])
