Added forking, probably should do more error checking