fix permissions
Improvements to handle timestamps and multiple inputs.