Added timestamping to logging
Added pbs functions