Added in.close()

Added in.close() to prevent a possible memory leak during execution.