Added PID printing via flag

Prints to stderr. Also "fixed" up waiting for attachment to only wait for 15 seconds after which normal program execution is resumed.