Use try/catch blocks with fs.{function}Sync() calls because they throw errors instead of returning like I had assumed.