remove line only if it exists
Stop hardcoding port. Thanks mamarley